home *** CD-ROM | disk | FTP | other *** search
/ This Disc Bytes! / Power Computing - The Disc 2 - This Disc Bytes.ISO / mac / CodeWarrior 7 Lite for 68K / MacOS Support / Headers / Universal Headers / FSM.h < prev    next >
Text File  |  1995-07-06  |  36KB  |  943 lines

  1. /*
  2.      File:        FSM.h
  3.  
  4.      Contains:    HFS External File System Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __FSM__
  21. #define __FSM__
  22.  
  23.  
  24. #ifndef __FILES__
  25. #include <Files.h>
  26. #endif
  27. /*    #include <Types.h>                                            */
  28. /*        #include <ConditionalMacros.h>                            */
  29. /*    #include <MixedMode.h>                                        */
  30. /*    #include <OSUtils.h>                                        */
  31. /*        #include <Memory.h>                                        */
  32. /*    #include <Finder.h>                                            */
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. #if PRAGMA_ALIGN_SUPPORTED
  39. #pragma options align=mac68k
  40. #endif
  41.  
  42. #if PRAGMA_IMPORT_SUPPORTED
  43. #pragma import on
  44. #endif
  45.  
  46. #if OLDROUTINELOCATIONS
  47.  
  48. enum {
  49.     volMountInteractBit            = 15,                            /* Input to VolumeMount: If set, it's OK for the file system */
  50.     volMountInteractMask        = 0x8000,                        /* to perform user interaction to mount the volume */
  51.     volMountChangedBit            = 14,                            /* Output from VoumeMount: If set, the volume was mounted, but */
  52.     volMountChangedMask            = 0x4000,                        /* the volume mounting information record needs to be updated. */
  53.     volMountFSReservedMask        = 0x00ff,                        /* bits 0-7 are defined by each file system for its own use */
  54.     volMountSysReservedMask        = 0xff00                        /* bits 8-15 are reserved for Apple system use */
  55. };
  56.  
  57. /*
  58.  * additional volume mount info record
  59.  */
  60. struct VolumeMountInfoHeader {
  61.     short                            length;                        /* length of location data (including self) */
  62.     VolumeType                        media;                        /* type of media (must be registered with Apple) */
  63.     short                            flags;                        /* volume mount flags. Variable length data follows */
  64. };
  65. typedef struct VolumeMountInfoHeader VolumeMountInfoHeader;
  66.  
  67. typedef VolumeMountInfoHeader *VolumeMountInfoHeaderPtr;
  68.  
  69.  
  70. enum {
  71.     gestaltFSMVersion            = 'fsm '
  72. };
  73.  
  74. typedef VCB *VCBPtr;
  75.  
  76. #endif
  77.  
  78. enum {
  79.     fsUsrCNID                    = 16,                            /* First assignable directory or file number */
  80. /*    File system trap word attribute bits */
  81.     kHFSBit                        = 9,                            /* HFS call: bit 9 */
  82.     kHFSMask                    = 0x0200,
  83.     kAsyncBit                    = 10,                            /* Asynchronous call: bit 10 */
  84.     kAsyncMask                    = 0x0400
  85. };
  86.  
  87. /*
  88.  * HFSCIProc selectCode values
  89.  * Note: The trap attribute bits (the HFS bit and the asynchronous bit)
  90.  * may be set in these selectCode values.
  91.  */
  92. enum {
  93.     kFSMOpen                    = 0xA000,
  94.     kFSMClose                    = 0xA001,
  95.     kFSMRead                    = 0xA002,
  96.     kFSMWrite                    = 0xA003,
  97.     kFSMGetVolInfo                = 0xA007,
  98.     kFSMCreate                    = 0xA008,
  99.     kFSMDelete                    = 0xA009,
  100.     kFSMOpenRF                    = 0xA00A,
  101.     kFSMRename                    = 0xA00B,
  102.     kFSMGetFileInfo                = 0xA00C,
  103.     kFSMSetFileInfo                = 0xA00D,
  104.     kFSMUnmountVol                = 0xA00E,
  105.     kFSMMountVol                = 0xA00F,
  106.     kFSMAllocate                = 0xA010,
  107.     kFSMGetEOF                    = 0xA011,
  108.     kFSMSetEOF                    = 0xA012,
  109.     kFSMFlushVol                = 0xA013,
  110.     kFSMGetVol                    = 0xA014,
  111.     kFSMSetVol                    = 0xA015,
  112.     kFSMEject                    = 0xA017,
  113.     kFSMGetFPos                    = 0xA018,
  114.     kFSMOffline                    = 0xA035,
  115.     kFSMSetFilLock                = 0xA041,
  116.     kFSMRstFilLock                = 0xA042,
  117.     kFSMSetFilType                = 0xA043,
  118.     kFSMSetFPos                    = 0xA044,
  119.     kFSMFlushFile                = 0xA045,
  120. /*    The File System HFSDispatch selectCodes */
  121.     kFSMOpenWD                    = 0x0001,
  122.     kFSMCloseWD                    = 0x0002,
  123.     kFSMCatMove                    = 0x0005,
  124.     kFSMDirCreate                = 0x0006,
  125.     kFSMGetWDInfo                = 0x0007,
  126.     kFSMGetFCBInfo                = 0x0008,
  127.     kFSMGetCatInfo                = 0x0009,
  128.     kFSMSetCatInfo                = 0x000A,
  129.     kFSMSetVolInfo                = 0x000B,
  130.     kFSMLockRng                    = 0x0010,
  131.     kFSMUnlockRng                = 0x0011,
  132.     kFSMCreateFileIDRef            = 0x0014,
  133.     kFSMDeleteFileIDRef            = 0x0015,
  134.     kFSMResolveFileIDRef        = 0x0016,
  135.     kFSMExchangeFiles            = 0x0017,
  136.     kFSMCatSearch                = 0x0018,
  137.     kFSMOpenDF                    = 0x001A,
  138.     kFSMMakeFSSpec                = 0x001B,
  139. /*    The Desktop Manager HFSDispatch selectCodes */
  140.     kFSMDTGetPath                = 0x0020,
  141.     kFSMDTCloseDown                = 0x0021,
  142.     kFSMDTAddIcon                = 0x0022,
  143.     kFSMDTGetIcon                = 0x0023,
  144.     kFSMDTGetIconInfo            = 0x0024,
  145.     kFSMDTAddAPPL                = 0x0025,
  146.     kFSMDTRemoveAPPL            = 0x0026,
  147.     kFSMDTGetAPPL                = 0x0027,
  148.     kFSMDTSetComment            = 0x0028,
  149.     kFSMDTRemoveComment            = 0x0029,
  150.     kFSMDTGetComment            = 0x002A,
  151.     kFSMDTFlush                    = 0x002B,
  152.     kFSMDTReset                    = 0x002C,
  153.     kFSMDTGetInfo                = 0x002D,
  154.     kFSMDTOpenInform            = 0x002E,
  155.     kFSMDTDelete                = 0x002F,
  156. /*    The AppleShare HFSDispatch selectCodes */
  157.     kFSMGetVolParms                = 0x0030,
  158.     kFSMGetLogInInfo            = 0x0031,
  159.     kFSMGetDirAccess            = 0x0032,
  160.     kFSMSetDirAccess            = 0x0033,
  161.     kFSMMapID                    = 0x0034,
  162.     kFSMMapName                    = 0x0035,
  163.     kFSMCopyFile                = 0x0036,
  164.     kFSMMoveRename                = 0x0037,
  165.     kFSMOpenDeny                = 0x0038,
  166.     kFSMOpenRFDeny                = 0x0039,
  167.     kFSMGetXCatInfo                = 0x003A,
  168.     kFSMGetVolMountInfoSize        = 0x003F,
  169.     kFSMGetVolMountInfo            = 0x0040,
  170.     kFSMVolumeMount                = 0x0041,
  171.     kFSMShare                    = 0x0042,
  172.     kFSMUnShare                    = 0x0043,
  173.     kFSMGetUGEntry                = 0x0044,
  174.     kFSMGetForeignPrivs            = 0x0060,
  175.     kFSMSetForeignPrivs            = 0x0061
  176. };
  177.  
  178. /*
  179.  * UTDetermineVol status values
  180.  */
  181. enum {
  182.     dtmvError                    = 0,                            /* param error */
  183.     dtmvFullPathame                = 1,                            /* determined by full pathname */
  184.     dtmvVRefNum                    = 2,                            /* determined by volume refNum */
  185.     dtmvWDRefNum                = 3,                            /* determined by working directory refNum */
  186.     dtmvDriveNum                = 4,                            /* determined by drive number */
  187.     dtmvDefault                    = 5                                /* determined by default volume */
  188. };
  189.  
  190. /*
  191.  * UTGetBlock options
  192.  */
  193. enum {
  194.     gbDefault                    = 0,                            /* default value - read if not found */
  195. /*    bits and masks */
  196.     gbReadBit                    = 0,                            /* read block from disk (forced read) */
  197.     gbReadMask                    = 0x0001,
  198.     gbExistBit                    = 1,                            /* get existing cache block */
  199.     gbExistMask                    = 0x0002,
  200.     gbNoReadBit                    = 2,                            /* don't read block from disk if not found in cache */
  201.     gbNoReadMask                = 0x0004,
  202.     gbReleaseBit                = 3,                            /* release block immediately after GetBlock */
  203.     gbReleaseMask                = 0x0008
  204. };
  205.  
  206. /*
  207.  * UTReleaseBlock options
  208.  */
  209. enum {
  210.     rbDefault                    = 0,                            /* default value - just mark the buffer not in-use */
  211. /*    bits and masks */
  212.     rbWriteBit                    = 0,                            /* force write buffer to disk */
  213.     rbWriteMask                    = 0x0001,
  214.     rbTrashBit                    = 1,                            /* trash buffer contents after release */
  215.     rbTrashMask                    = 0x0002,
  216.     rbDirtyBit                    = 2,                            /* mark buffer dirty */
  217.     rbDirtyMask                    = 0x0004,
  218.     rbFreeBit                    = 3,                            /* free the buffer (save in the hash) */
  219. /*
  220.  *    rbFreeMask (rbFreeBit + rbTrashBit) works as rbTrash on < System 7.0 RamCache;
  221.  *    on >= System 7.0, rbfreeMask overrides rbTrash
  222.  */
  223.     rbFreeMask                    = 0x000A
  224. };
  225.  
  226. /*
  227.  * UTFlushCache options
  228.  */
  229. enum {
  230.     fcDefault                    = 0,                            /* default value - just flush any dirty buffers */
  231. /*    bits and masks */
  232.     fcTrashBit                    = 1,                            /* trash buffers after flushing */
  233.     fcTrashMask                    = 0x0002,
  234.     fcFreeBit                    = 3,                            /* free buffers after flushing */
  235.     fcFreeMask                    = 0x0008                        /* fcFreeMask works as fcTrash on < System 7.0 RamCache */
  236. };
  237.  
  238. /*
  239.  * UTCacheReadIP and UTCacheWriteIP cacheOption
  240.  */
  241. enum {
  242.     noCacheBit                    = 5,                            /* don't cache this please */
  243.     noCacheMask                    = 0x0020,
  244.     rdVerifyBit                    = 6,                            /* read verify */
  245.     rdVerifyMask                = 0x0040
  246. };
  247.  
  248. /*
  249.  * Cache routine internal error codes
  250.  */
  251. enum {
  252.     chNoBuf                        = 1,                            /* no free cache buffers (all in use) */
  253.     chInUse                        = 2,                            /* requested block in use */
  254.     chnotfound                    = 3,                            /* requested block not found */
  255.     chNotInUse                    = 4                                /* block being released was not in use */
  256. };
  257.  
  258. /*
  259.  * FCBRec.fcbFlags bits
  260.  */
  261. enum {
  262.     fcbWriteBit                    = 0,                            /* Data can be written to this file */
  263.     fcbWriteMask                = 0x01,
  264.     fcbResourceBit                = 1,                            /* This file is a resource fork */
  265.     fcbResourceMask                = 0x02,
  266.     fcbWriteLockedBit            = 2,                            /* File has a locked byte range */
  267.     fcbWriteLockedMask            = 0x04,
  268.     fcbSharedWriteBit            = 4,                            /* File is open for shared write access */
  269.     fcbSharedWriteMask            = 0x10,
  270.     fcbFileLockedBit            = 5,                            /* File is locked (write-protected) */
  271.     fcbFileLockedMask            = 0x20,
  272.     fcbOwnClumpBit                = 6,                            /* File has clump size specified in FCB */
  273.     fcbOwnClumpMask                = 0x40,
  274.     fcbModifiedBit                = 7,                            /* File has changed since it was last flushed */
  275.     fcbModifiedMask                = 0x80
  276. };
  277.  
  278. /*
  279.  * ExtFileProc options
  280.  */
  281. enum {
  282.     extendFileAllBit            = 0,                            /* allocate all requested bytes or none */
  283.     extendFileAllMask            = 0x0001,
  284.     extendFileContigBit            = 1,                            /* force contiguous allocation */
  285.     extendFileContigMask        = 0x0002
  286. };
  287.  
  288. /*
  289.  *    HFS Component Interface constants
  290.  */
  291. /*
  292.  * compInterfMask bits specific to HFS component
  293.  */
  294. enum {
  295.     hfsCIDoesHFSBit                = 23,                            /* set if file system supports HFS calls */
  296.     hfsCIDoesHFSMask            = 0x00800000,
  297.     hfsCIDoesAppleShareBit        = 22,                            /* set if AppleShare calls supported */
  298.     hfsCIDoesAppleShareMask        = 0x00400000,
  299.     hfsCIDoesDeskTopBit            = 21,                            /* set if Desktop Database calls supported */
  300.     hfsCIDoesDeskTopMask        = 0x00200000,
  301.     hfsCIDoesDynamicLoadBit        = 20,                            /* set if dynamically loading code resource */
  302.     hfsCIDoesDynamicLoadMask    = 0x00100000,                    /*        supported */
  303.     hfsCIResourceLoadedBit        = 19,                            /* set if code resource already loaded */
  304.     hfsCIResourceLoadedMask        = 0x00080000,
  305.     hfsCIHasHLL2PProcBit        = 18,                            /* set if FFS' log2PhyProc and Extendfile proc */
  306.     hfsCIHasHLL2PProcMask        = 0x00040000                    /* is written in a high level language. (i.e., uses Pascal calling convention) */
  307. };
  308.  
  309. /*
  310.  *    Disk Initialization Component Interface constants
  311.  */
  312. /*
  313.  * compInterfMask bits specific to Disk Initialization component
  314.  */
  315. enum {
  316.     diCIHasExtFormatParamsBit    = 18,                            /* set if file system needs extended format */
  317.     diCIHasExtFormatParamsMask    = 0x00040000,                    /*        parameters */
  318.     diCIHasMultiVolTypesBit        = 17,                            /* set if file system supports more than one */
  319.     diCIHasMultiVolTypesMask    = 0x00020000,                    /*        volume type */
  320.     diCIDoesSparingBit            = 16,                            /* set if file system supports disk sparing */
  321.     diCIDoesSparingMask            = 0x00010000,
  322.     diCILiveBit                    = 0,                            /* set if file system is candidate for current */
  323.     diCILiveMask                = 0x00000001                    /*        formatting operation (set by PACK2) */
  324. };
  325.  
  326. /*
  327.  * Disk Initialization Component Function selectors
  328.  */
  329. enum {
  330.     diCILoad                    = 1,                            /* Make initialization code memory resident */
  331.     diCIUnload                    = 2,                            /* Make initialization code purgeable */
  332.     diCIEvaluateSizeChoices        = 3,                            /* Evaluate size choices */
  333.     diCIExtendedZero            = 4,                            /* Write an empty volume directory */
  334.     diCIValidateVolName            = 5,                            /* Validate volume name */
  335.     diCIGetVolTypeInfo            = 6,                            /* get volume type info */
  336.     diCIGetFormatString            = 7,                            /* get dialog format string */
  337.     diCIGetExtFormatParams        = 8,                            /* get extended format parameters */
  338.     diCIGetDefectList            = 9                                /* return the defect list for the indicated disk - reserved for future use */
  339. };
  340.  
  341. /*
  342.  * Constants used in the DICIEvaluateSizeRec and FormatListRec
  343.  */
  344. enum {
  345.     diCIFmtListMax                = 8,                            /* maximum number of format list entries in DICIEvaluateSizeRec.numSizeEntries */
  346. /*    bits in FormatListRec.formatFlags: */
  347.     diCIFmtFlagsValidBit        = 7,                            /* set if sec, side, tracks valid */
  348.     diCIFmtFlagsValidMask        = 0x80,
  349.     diCIFmtFlagsCurrentBit        = 6,                            /* set if current disk has this fmt */
  350.     diCIFmtFlagsCurrentMask        = 0x40,
  351. /*    bits in FormatListRec.sizeListFlags: */
  352.     diCISizeListOKBit            = 15,                            /* set if this disk size usable */
  353.     diCISizeListOKMask            = 0x8000
  354. };
  355.  
  356. /*
  357.  * DICIGetFormatStringRec.stringKind format strings
  358.  */
  359. enum {
  360.     diCIAlternateFormatStr        = 1,                            /* get alternate format  string (Balloon Help) */
  361.     diCISizePresentationStr        = 2                                /* get size presentation string (for dialog) */
  362. };
  363.  
  364. /*
  365.  * Error codes returned by Disk Sparing
  366.  */
  367. enum {
  368.     diCIUserCancelErr            = 1,                            /* user cancelled the disk init */
  369.     diCICriticalSectorBadErr    = 20,                            /* critical sectors are bad (hopeless)    */
  370.     diCISparingFailedErr        = 21,                            /* disk cannot be spared */
  371.     diCITooManyBadSectorsErr    = 22,                            /* too many bad sectors */
  372.     diCIUnknownVolTypeErr        = 23,                            /* the volume type passed in diCIExtendedZero paramBlock is not supported */
  373.     diCIVolSizeMismatchErr        = 24,                            /* specified volume size doesn’t match with formatted disk size */
  374.     diCIUnknownDICallErr        = 25,                            /* bogus DI function call selector */
  375.     diCINoSparingErr            = 26,                            /* disk is bad but the target FS doesn't do disk sparing */
  376.     diCINoExtendInfoErr            = 27,                            /* missing file system specific extra parameter in diCIExtendedZero call */
  377.     diCINoMessageTextErr        = 28                            /* missing message text in DIReformat call */
  378. };
  379.  
  380. /*
  381.  *    File System Manager constants
  382.  */
  383. /*
  384.  * Miscellaneous constants used by FSM
  385.  */
  386. enum {
  387.     fsdVersion1                    = 1,                            /* current version of FSD record */
  388.     fsmIgnoreFSID                = 0xfffe,                        /* this FSID should be ignored by the driver */
  389.     fsmGenericFSID                = 0xffff                        /* unknown foreign file system ID */
  390. };
  391.  
  392. /*
  393.  * compInterfMask bits common to all FSM components
  394.  */
  395. enum {
  396.     fsmComponentEnableBit        = 31,                            /* set if FSM component interface is enabled */
  397.     fsmComponentEnableMask        = 0x80000000,
  398.     fsmComponentBusyBit            = 30,                            /* set if FSM component interface is busy */
  399.     fsmComponentBusyMask        = 0x40000000
  400. };
  401.  
  402. /*
  403.  * Selectors for GetFSInfo
  404.  */
  405. enum {
  406.     fsmGetFSInfoByIndex            = -1,                            /* get fs info by index */
  407.     fsmGetFSInfoByFSID            = 0,                            /* get fs info by FSID */
  408.     fsmGetFSInfoByRefNum        = 1                                /* get fs info by file/vol refnum */
  409. };
  410.  
  411. /*
  412.  * InformFSM messages
  413.  */
  414. enum {
  415.     fsmNopMessage                = 0,                            /* nop */
  416.     fsmDrvQElChangedMessage        = 1,                            /* DQE has changed */
  417.     fsmGetFSIconMessage            = 2                                /* Get FFS's disk icon */
  418. };
  419.  
  420. /*
  421.  * Messages passed to the fileSystemCommProc
  422.  */
  423. enum {
  424.     ffsNopMessage                = 0,                            /* nop, should always return noErr */
  425.     ffsGetIconMessage            = 1,                            /* return disk icon and mask */
  426.     ffsIDDiskMessage            = 2,                            /* identify the about-to-be-mounted volume */
  427.     ffsLoadMessage                = 3,                            /* load in the FFS */
  428.     ffsUnloadMessage            = 4,                            /* unload the FFS */
  429.     ffsIDVolMountMessage        = 5,                            /* identify a VolMountInfo record */
  430.     ffsInformMessage            = 6,                            /* FFS defined message */
  431.     ffsGetIconInfoMessage        = 7
  432. };
  433.  
  434. /*
  435.  * Error codes from FSM functions
  436.  */
  437. enum {
  438.     fsmFFSNotFoundErr            = -431,                            /* Foreign File system does not exist - new Pack2 could return this error too */
  439.     fsmBusyFFSErr                = -432,                            /* File system is busy, cannot be removed */
  440.     fsmBadFFSNameErr            = -433,                            /* Name length not 1 <= length <= 31 */
  441.     fsmBadFSDLenErr                = -434,                            /* FSD size incompatible with current FSM vers */
  442.     fsmDuplicateFSIDErr            = -435,                            /* FSID already exists on InstallFS */
  443.     fsmBadFSDVersionErr            = -436,                            /* FSM version incompatible with FSD */
  444.     fsmNoAlternateStackErr        = -437,                            /* no alternate stack for HFS CI */
  445.     fsmUnknownFSMMessageErr        = -438                            /* unknown message passed to FSM */
  446. };
  447.  
  448. /*
  449.  *    HFS Utility routine records
  450.  */
  451. /*
  452.  * record used by UTGetPathComponentName
  453.  */
  454. struct ParsePathRec {
  455.     StringPtr                        namePtr;                    /* pathname to parse */
  456.     short                            startOffset;                /* where to start parsing */
  457.     short                            componentLength;            /* the length of the pathname component parsed */
  458.     SignedByte                        moreName;                    /* non-zero if there are more components after this one */
  459.     SignedByte                        foundDelimiter;                /* non-zero if parsing stopped because a colon (:) delimiter was found */
  460. };
  461. typedef struct ParsePathRec ParsePathRec;
  462.  
  463. typedef ParsePathRec *ParsePathRecPtr;
  464.  
  465. struct WDCBRec {
  466.     VCBPtr                            wdVCBPtr;                    /* Pointer to VCB of this working directory */
  467.     long                            wdDirID;                    /* Directory ID number of this working directory */
  468.     long                            wdCatHint;                    /* Hint for finding this working directory */
  469.     long                            wdProcID;                    /* Process that created this working directory */
  470. };
  471. typedef struct WDCBRec WDCBRec;
  472.  
  473. typedef WDCBRec *WDCBRecPtr;
  474.  
  475. struct FCBRec {
  476.     unsigned long                    fcbFlNm;                    /* FCB file number. Non-zero marks FCB used */
  477.     SignedByte                        fcbFlags;                    /* FCB flags */
  478.     SignedByte                        fcbTypByt;                    /* File type byte */
  479.     unsigned short                    fcbSBlk;                    /* File start block (in alloc size blks) */
  480.     unsigned long                    fcbEOF;                        /* Logical length or EOF in bytes */
  481.     unsigned long                    fcbPLen;                    /* Physical file length in bytes */
  482.     unsigned long                    fcbCrPs;                    /* Current position within file */
  483.     VCBPtr                            fcbVPtr;                    /* Pointer to the corresponding VCB */
  484.     Ptr                                fcbBfAdr;                    /* File's buffer address */
  485.     unsigned short                    fcbFlPos;                    /* Directory block this file is in */
  486. /* FCB Extensions for HFS */
  487.     unsigned long                    fcbClmpSize;                /* Number of bytes per clump */
  488.     Ptr                                fcbBTCBPtr;                    /* Pointer to B*-Tree control block for file */
  489.     unsigned long                    fcbExtRec[3];                /* First 3 file extents */
  490.     OSType                            fcbFType;                    /* File's 4 Finder Type bytes */
  491.     unsigned long                    fcbCatPos;                    /* Catalog hint for use on Close */
  492.     unsigned long                    fcbDirID;                    /* Parent Directory ID */
  493.     Str31                            fcbCName;                    /* CName of open file */
  494. };
  495. typedef struct FCBRec FCBRec;
  496.  
  497. typedef FCBRec *FCBRecPtr;
  498.  
  499. /*
  500.  *    HFS Component Interface records
  501.  */
  502. typedef pascal OSErr (*Lg2PhysProcPtr)(void *fsdGlobalPtr, VCBPtr volCtrlBlockPtr, FCBRecPtr fileCtrlBlockPtr, short fileRefNum, unsigned long filePosition, unsigned long reqCount, unsigned long *volOffset, unsigned long *contiguousBytes);
  503.  
  504. #if GENERATINGCFM
  505. typedef UniversalProcPtr Lg2PhysUPP;
  506. #else
  507. typedef Lg2PhysProcPtr Lg2PhysUPP;
  508. #endif
  509.  
  510. enum {
  511.     uppLg2PhysProcInfo = kPascalStackBased
  512.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  513.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void*)))
  514.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(VCBPtr)))
  515.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(FCBRecPtr)))
  516.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short)))
  517.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(unsigned long)))
  518.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(unsigned long)))
  519.          | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(unsigned long*)))
  520.          | STACK_ROUTINE_PARAMETER(8, SIZE_CODE(sizeof(unsigned long*)))
  521. };
  522.  
  523. #if GENERATINGCFM
  524. #define NewLg2PhysProc(userRoutine)        \
  525.         (Lg2PhysUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppLg2PhysProcInfo, GetCurrentArchitecture())
  526. #else
  527. #define NewLg2PhysProc(userRoutine)        \
  528.         ((Lg2PhysUPP) (userRoutine))
  529. #endif
  530.  
  531. #if GENERATINGCFM
  532. #define CallLg2PhysProc(userRoutine, fsdGlobalPtr, volCtrlBlockPtr, fileCtrlBlockPtr, fileRefNum, filePosition, reqCount, volOffset, contiguousBytes)        \
  533.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppLg2PhysProcInfo, (fsdGlobalPtr), (volCtrlBlockPtr), (fileCtrlBlockPtr), (fileRefNum), (filePosition), (reqCount), (volOffset), (contiguousBytes))
  534. #else
  535. #define CallLg2PhysProc(userRoutine, fsdGlobalPtr, volCtrlBlockPtr, fileCtrlBlockPtr, fileRefNum, filePosition, reqCount, volOffset, contiguousBytes)        \
  536.         (*(userRoutine))((fsdGlobalPtr), (volCtrlBlockPtr), (fileCtrlBlockPtr), (fileRefNum), (filePosition), (reqCount), (volOffset), (contiguousBytes))
  537. #endif
  538.  
  539. typedef pascal OSErr (*HFSCIProcPtr)(VCBPtr theVCB, short selectCode, void *paramBlock, void *fsdGlobalPtr, short fsid);
  540.  
  541. #if GENERATINGCFM
  542. typedef UniversalProcPtr HFSCIUPP;
  543. #else
  544. typedef HFSCIProcPtr HFSCIUPP;
  545. #endif
  546.  
  547. enum {
  548.     uppHFSCIProcInfo = kPascalStackBased
  549.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  550.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(VCBPtr)))
  551.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  552.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void*)))
  553.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*)))
  554.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(short)))
  555. };
  556.  
  557. #if GENERATINGCFM
  558. #define NewHFSCIProc(userRoutine)        \
  559.         (HFSCIUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppHFSCIProcInfo, GetCurrentArchitecture())
  560. #else
  561. #define NewHFSCIProc(userRoutine)        \
  562.         ((HFSCIUPP) (userRoutine))
  563. #endif
  564.  
  565. #if GENERATINGCFM
  566. #define CallHFSCIProc(userRoutine, theVCB, selectCode, paramBlock, fsdGlobalPtr, fsid)        \
  567.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppHFSCIProcInfo, (theVCB), (selectCode), (paramBlock), (fsdGlobalPtr), (fsid))
  568. #else
  569. #define CallHFSCIProc(userRoutine, theVCB, selectCode, paramBlock, fsdGlobalPtr, fsid)        \
  570.         (*(userRoutine))((theVCB), (selectCode), (paramBlock), (fsdGlobalPtr), (fsid))
  571. #endif
  572.  
  573. struct HFSCIRec {
  574.     long                            compInterfMask;                /* component flags */
  575.     HFSCIUPP                        compInterfProc;                /* pointer to file system call processing code */
  576.     Lg2PhysUPP                        log2PhyProc;                /* pointer to Lg2PhysProc() code */
  577.     Ptr                                stackTop;                    /* file system stack top */
  578.     long                            stackSize;                    /* file system stack size */
  579.     Ptr                                stackPtr;                    /* current file system stack pointer */
  580.     long                            reserved3;                    /* --reserved, must be zero-- */
  581.     long                            idSector;                    /* Sector you need to ID a local volume. For networked volumes, this must be -1 */
  582.     long                            reserved2;                    /* --reserved, must be zero-- */
  583.     long                            reserved1;                    /* --reserved, must be zero-- */
  584. };
  585. typedef struct HFSCIRec HFSCIRec;
  586.  
  587. typedef HFSCIRec *HFSCIRecPtr;
  588.  
  589. /*
  590.  *    Disk Initialization Component Interface records
  591.  */
  592. typedef pascal OSErr (*DICIProcPtr)(short whatFunction, void *paramBlock, void *fsdGlobalPtr);
  593.  
  594. #if GENERATINGCFM
  595. typedef UniversalProcPtr DICIUPP;
  596. #else
  597. typedef DICIProcPtr DICIUPP;
  598. #endif
  599.  
  600. enum {
  601.     uppDICIProcInfo = kPascalStackBased
  602.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  603.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  604.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void*)))
  605.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void*)))
  606. };
  607.  
  608. #if GENERATINGCFM
  609. #define NewDICIProc(userRoutine)        \
  610.         (DICIUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDICIProcInfo, GetCurrentArchitecture())
  611. #else
  612. #define NewDICIProc(userRoutine)        \
  613.         ((DICIUPP) (userRoutine))
  614. #endif
  615.  
  616. #if GENERATINGCFM
  617. #define CallDICIProc(userRoutine, whatFunction, paramBlock, fsdGlobalPtr)        \
  618.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppDICIProcInfo, (whatFunction), (paramBlock), (fsdGlobalPtr))
  619. #else
  620. #define CallDICIProc(userRoutine, whatFunction, paramBlock, fsdGlobalPtr)        \
  621.         (*(userRoutine))((whatFunction), (paramBlock), (fsdGlobalPtr))
  622. #endif
  623.  
  624. struct DICIRec {
  625.     long                            compInterfMask;                /* component flags */
  626.     DICIUPP                            compInterfProc;                /* pointer to call processing code */
  627.     short                            maxVolNameLength;            /* maximum length of your volume name */
  628.     unsigned short                    blockSize;                    /* your file system's block size */
  629.     long                            reserved3;                    /* --reserved, must be zero-- */
  630.     long                            reserved2;                    /* --reserved, must be zero-- */
  631.     long                            reserved1;                    /* --reserved, must be zero-- */
  632. };
  633. typedef struct DICIRec DICIRec;
  634.  
  635. typedef DICIRec *DICIRecPtr;
  636.  
  637. /*
  638.  * FormatListRec as returned by the .Sony disk driver's
  639.  * Return Format List status call (csCode = 6).
  640.  * If the status call to get this list for a drive is not
  641.  * implemented by the driver, then a list with one entry
  642.  * is contructed from the drive queue element for the drive.
  643.  */
  644. struct FormatListRec {
  645.     unsigned long                    volSize;                    /* disk capacity in SECTORs */
  646.     SignedByte                        formatFlags;                /* flags */
  647.     SignedByte                        sectorsPerTrack;            /* sectors per track side */
  648.     unsigned short                    tracks;                        /* number of tracks */
  649. };
  650. typedef struct FormatListRec FormatListRec;
  651.  
  652. typedef FormatListRec *FormatListRecPtr;
  653.  
  654. /*
  655.  * SizeListRec built from FormatListRecs as described above.
  656.  */
  657. struct SizeListRec {
  658.     short                            sizeListFlags;                /* flags as set by external file system */
  659.     FormatListRec                    sizeEntry;                    /* disk driver format list record */
  660. };
  661. typedef struct SizeListRec SizeListRec;
  662.  
  663. typedef SizeListRec *SizeListRecPtr;
  664.  
  665. /*
  666.  * paramBlock for the diCIEvaluateSize call
  667.  */
  668. struct DICIEvaluateSizeRec {
  669.     short                            defaultSizeIndex;            /* default size for this FS */
  670.     short                            numSizeEntries;                /* number of size entries */
  671.     short                            driveNumber;                /* drive number */
  672.     SizeListRecPtr                    sizeListPtr;                /* ptr to size entry table */
  673.     unsigned short                    sectorSize;                    /* bytes per sector */
  674. };
  675. typedef struct DICIEvaluateSizeRec DICIEvaluateSizeRec;
  676.  
  677. typedef DICIEvaluateSizeRec *DICIEvaluateSizeRecPtr;
  678.  
  679. /*
  680.  * paramBlock for the diCIExtendedZero call
  681.  */
  682. struct DICIExtendedZeroRec {
  683.     short                            driveNumber;                /* drive number */
  684.     StringPtr                        volNamePtr;                    /* ptr to volume name string */
  685.     short                            fsid;                        /* file system ID */
  686.     short                            volTypeSelector;            /* volume type selector, if supports more than 1 type */
  687.     unsigned short                    numDefectBlocks;            /* number of bad logical blocks */
  688.     unsigned short                    defectListSize;                /* size of the defect list buffer in bytes */
  689.     Ptr                                defectListPtr;                /* pointer to defect list buffer */
  690.     unsigned long                    volSize;                    /* size of volume in SECTORs */
  691.     unsigned short                    sectorSize;                    /* bytes per sector */
  692.     Ptr                                extendedInfoPtr;            /* ptr to extended info */
  693. };
  694. typedef struct DICIExtendedZeroRec DICIExtendedZeroRec;
  695.  
  696. typedef DICIExtendedZeroRec *DICIExtendedZeroRecPtr;
  697.  
  698. /*
  699.  * paramBlock for the diCIValidateVolName call
  700.  */
  701. struct DICIValidateVolNameRec {
  702.     char                            theChar;                    /* the character to validate */
  703.     Boolean                            hasMessageBuffer;            /* false if no message */
  704.     short                            charOffset;                    /* position of the current character (first char = 1) */
  705.     StringPtr                        messageBufferPtr;            /* pointer to message buffer or nil */
  706.     short                            charByteType;                /* theChar's byte type (smSingleByte, smFirstByte, or smLastByte) */
  707. };
  708. typedef struct DICIValidateVolNameRec DICIValidateVolNameRec;
  709.  
  710. typedef DICIValidateVolNameRec *DICIValidateVolNameRecPtr;
  711.  
  712. /*
  713.  * paramBlock for the diCIGetVolTypeInfo call
  714.  */
  715. struct DICIGetVolTypeInfoRec {
  716.     unsigned long                    volSize;                    /* size of volume in SECTORs */
  717.     unsigned short                    sectorSize;                    /* bytes per sector */
  718.     short                            numVolTypes;                /* number of volume types supported */
  719.     Str31                            volTypesBuffer[4];            /* 4 string buffers */
  720. };
  721. typedef struct DICIGetVolTypeInfoRec DICIGetVolTypeInfoRec;
  722.  
  723. typedef DICIGetVolTypeInfoRec *DICIGetVolTypeInfoRecPtr;
  724.  
  725. /*
  726.  * paramBlock for the diCIGetFormatString call
  727.  */
  728. struct DICIGetFormatStringRec {
  729.     unsigned long                    volSize;                    /* volume size in SECTORs */
  730.     unsigned short                    sectorSize;                    /* sector size */
  731.     short                            volTypeSelector;            /* volume type selector */
  732.     short                            stringKind;                    /* sub-function = type of string */
  733.     Str255                            stringBuffer;                /* string buffer */
  734. };
  735. typedef struct DICIGetFormatStringRec DICIGetFormatStringRec;
  736.  
  737. typedef DICIGetFormatStringRec *DICIGetFormatStringRecPtr;
  738.  
  739. /*
  740.  * paramBlock for the diCIGetExtendedFormatParams call
  741.  */
  742. struct DICIGetExtendedFormatRec {
  743.     short                            driveNumber;                /* drive number */
  744.     short                            volTypeSelector;            /* volume type selector or 0 */
  745.     unsigned long                    volSize;                    /* size of volume in SECTORs */
  746.     unsigned short                    sectorSize;                    /* bytes per sector */
  747.     FSSpecPtr                        fileSystemSpecPtr;            /* pointer to the foreign file system's FSSpec */
  748.     Ptr                                extendedInfoPtr;            /* pointer to extended parameter structure */
  749. };
  750. typedef struct DICIGetExtendedFormatRec DICIGetExtendedFormatRec;
  751.  
  752. typedef DICIGetExtendedFormatRec *DICIGetExtendedFormatRecPtr;
  753.  
  754. /*
  755.  *    File System Manager records
  756.  */
  757. typedef pascal OSErr (*FSDCommProcPtr)(short message, void *paramBlock, void *globalsPtr);
  758.  
  759. #if GENERATINGCFM
  760. typedef UniversalProcPtr FSDCommUPP;
  761. #else
  762. typedef FSDCommProcPtr FSDCommUPP;
  763. #endif
  764.  
  765. enum {
  766.     uppFSDCommProcInfo = kPascalStackBased
  767.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  768.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  769.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void*)))
  770.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void*)))
  771. };
  772.  
  773. #if GENERATINGCFM
  774. #define NewFSDCommProc(userRoutine)        \
  775.         (FSDCommUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppFSDCommProcInfo, GetCurrentArchitecture())
  776. #else
  777. #define NewFSDCommProc(userRoutine)        \
  778.         ((FSDCommUPP) (userRoutine))
  779. #endif
  780.  
  781. #if GENERATINGCFM
  782. #define CallFSDCommProc(userRoutine, message, paramBlock, globalsPtr)        \
  783.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppFSDCommProcInfo, (message), (paramBlock), (globalsPtr))
  784. #else
  785. #define CallFSDCommProc(userRoutine, message, paramBlock, globalsPtr)        \
  786.         (*(userRoutine))((message), (paramBlock), (globalsPtr))
  787. #endif
  788.  
  789. struct FSDRec {
  790.     struct FSDRec                    *fsdLink;                    /* ptr to next */
  791.     short                            fsdLength;                    /* length of this FSD in BYTES */
  792.     short                            fsdVersion;                    /* version number */
  793.     short                            fileSystemFSID;                /* file system id */
  794.     Str31                            fileSystemName;                /* file system name */
  795.     FSSpec                            fileSystemSpec;                /* foreign file system's FSSpec */
  796.     Ptr                                fileSystemGlobalsPtr;        /* ptr to file system globals */
  797.     FSDCommUPP                        fileSystemCommProc;            /* communication proc with the FFS */
  798.     long                            reserved3;                    /* --reserved, must be zero-- */
  799.     long                            reserved2;                    /* --reserved, must be zero-- */
  800.     long                            reserved1;                    /* --reserved, must be zero-- */
  801.     HFSCIRec                        fsdHFSCI;                    /* HFS component interface    */
  802.     DICIRec                            fsdDICI;                    /* Disk Initialization component interface */
  803. };
  804. typedef struct FSDRec FSDRec;
  805.  
  806. typedef FSDRec *FSDRecPtr;
  807.  
  808. struct FSMGetIconInfoRec {
  809.     long                            theIcon[32];                /* The ICN# structure */
  810.     long                            theMask[32];                /* The mask for the icon above */
  811.     Str255                            whereStr;
  812. };
  813. typedef struct FSMGetIconInfoRec FSMGetIconInfoRec;
  814.  
  815. typedef FSMGetIconInfoRec *FSMGetIconInfoRecPtr;
  816.  
  817. /*
  818.  * paramBlock for ffsGetIconMessage and fsmGetFSIconMessage
  819.  */
  820. struct FSMGetIconRec {
  821.     short                            refNum;                        /* target drive num or volume refnum */
  822.     FSMGetIconInfoRecPtr            iconBufferPtr;                /* pointer to icon buffer */
  823.     long                            requestSize;                /* requested size of the icon buffer */
  824.     long                            actualSize;                    /* actual size of the icon data returned */
  825.     SInt8                            iconType;                    /* kind of icon */
  826.     Boolean                            isEjectable;                /* true if the device is ejectable */
  827.     DrvQElPtr                        driveQElemPtr;                /* pointer to DQE */
  828.     FSSpecPtr                        fileSystemSpecPtr;            /* pointer to foreign file system's FSSpec */
  829.     long                            reserved1;                    /* --reserved, must be zero-- */
  830. };
  831. typedef struct FSMGetIconRec FSMGetIconRec;
  832.  
  833. typedef FSMGetIconRec *FSMGetIconRecPtr;
  834.  
  835. /*
  836.  *    HFS Utility routine prototypes
  837.  */
  838. extern pascal OSErr UTAllocateFCB(short *fileRefNum, FCBRecPtr *fileCtrlBlockPtr)
  839.  TWOWORDINLINE(0x7000, 0xA824);
  840. extern pascal OSErr UTReleaseFCB(short fileRefNum)
  841.  TWOWORDINLINE(0x7001, 0xA824);
  842. extern pascal OSErr UTLocateFCB(VCBPtr volCtrlBlockPtr, unsigned long fileNum, StringPtr namePtr, short *fileRefNum, FCBRecPtr *fileCtrlBlockPtr)
  843.  TWOWORDINLINE(0x7002, 0xA824);
  844. extern pascal OSErr UTLocateNextFCB(VCBPtr volCtrlBlockPtr, unsigned long fileNum, StringPtr namePtr, short *fileRefNum, FCBRecPtr *fileCtrlBlockPtr)
  845.  TWOWORDINLINE(0x7003, 0xA824);
  846. extern pascal OSErr UTIndexFCB(VCBPtr volCtrlBlockPtr, short *fileRefNum, FCBRecPtr *fileCtrlBlockPtr)
  847.  TWOWORDINLINE(0x7004, 0xA824);
  848. extern pascal OSErr UTResolveFCB(short fileRefNum, FCBRecPtr *fileCtrlBlockPtr)
  849.  TWOWORDINLINE(0x7005, 0xA824);
  850. extern pascal OSErr UTAllocateVCB(unsigned short *sysVCBLength, VCBPtr *volCtrlBlockPtr, unsigned short addSize)
  851.  TWOWORDINLINE(0x7006, 0xA824);
  852. extern pascal OSErr UTAddNewVCB(short driveNum, short *vRefNum, VCBPtr volCtrlBlockPtr)
  853.  TWOWORDINLINE(0x7007, 0xA824);
  854. extern pascal OSErr UTDisposeVCB(VCBPtr volCtrlBlockPtr)
  855.  TWOWORDINLINE(0x7008, 0xA824);
  856. extern pascal OSErr UTLocateVCBByRefNum(short refNum, short *vRefNum, VCBPtr *volCtrlBlockPtr)
  857.  TWOWORDINLINE(0x7009, 0xA824);
  858. extern pascal OSErr UTLocateVCBByName(StringPtr namePtr, short *moreMatches, short *vRefNum, VCBPtr *volCtrlBlockPtr)
  859.  TWOWORDINLINE(0x700A, 0xA824);
  860. extern pascal OSErr UTLocateNextVCB(StringPtr namePtr, short *moreMatches, short *vRefNum, VCBPtr *volCtrlBlockPtr)
  861.  TWOWORDINLINE(0x700B, 0xA824);
  862. extern pascal OSErr UTAllocateWDCB(WDPBPtr paramBlock)
  863.  TWOWORDINLINE(0x700C, 0xA824);
  864. extern pascal OSErr UTReleaseWDCB(short wdRefNum)
  865.  TWOWORDINLINE(0x700D, 0xA824);
  866. extern pascal OSErr UTResolveWDCB(long procID, short wdIndex, short wdRefNum, WDCBRecPtr *wdCtrlBlockPtr)
  867.  TWOWORDINLINE(0x700E, 0xA824);
  868. extern pascal OSErr UTFindDrive(short driveNum, DrvQElPtr *driveQElementPtr)
  869.  TWOWORDINLINE(0x700F, 0xA824);
  870. extern pascal OSErr UTAdjustEOF(short fileRefNum)
  871.  TWOWORDINLINE(0x7010, 0xA824);
  872. extern pascal OSErr UTSetDefaultVol(long nodeHint, unsigned long dirID, short refNum)
  873.  TWOWORDINLINE(0x7011, 0xA824);
  874. extern pascal OSErr UTGetDefaultVol(WDPBPtr paramBlock)
  875.  TWOWORDINLINE(0x7012, 0xA824);
  876. extern pascal OSErr UTEjectVol(VCBPtr volCtrlBlockPtr)
  877.  TWOWORDINLINE(0x702B, 0xA824);
  878. extern pascal OSErr UTCheckWDRefNum(short wdRefNum)
  879.  TWOWORDINLINE(0x7013, 0xA824);
  880. extern pascal OSErr UTCheckFileRefNum(short fileRefNum)
  881.  TWOWORDINLINE(0x7014, 0xA824);
  882. extern pascal OSErr UTCheckVolRefNum(short vRefNum)
  883.  TWOWORDINLINE(0x7015, 0xA824);
  884. extern pascal OSErr UTCheckPermission(VCBPtr volCtrlBlockPtr, short *modByte, unsigned long fileNum, ParmBlkPtr paramBlock)
  885.  TWOWORDINLINE(0x7016, 0xA824);
  886. extern pascal OSErr UTCheckVolOffline(short vRefNum)
  887.  TWOWORDINLINE(0x7017, 0xA824);
  888. extern pascal OSErr UTCheckVolModifiable(short vRefNum)
  889.  TWOWORDINLINE(0x7018, 0xA824);
  890. extern pascal OSErr UTCheckFileModifiable(short fileRefNum)
  891.  TWOWORDINLINE(0x7019, 0xA824);
  892. extern pascal OSErr UTCheckDirBusy(VCBPtr volCtrlBlockPtr, unsigned long dirID)
  893.  TWOWORDINLINE(0x701A, 0xA824);
  894. extern pascal OSErr UTParsePathname(short *volNamelength, StringPtr namePtr)
  895.  TWOWORDINLINE(0x701B, 0xA824);
  896. extern pascal OSErr UTGetPathComponentName(ParsePathRecPtr parseRec)
  897.  TWOWORDINLINE(0x701C, 0xA824);
  898. extern pascal OSErr UTDetermineVol(ParmBlkPtr paramBlock, short *status, short *moreMatches, short *vRefNum, VCBPtr *volCtrlBlockPtr)
  899.  TWOWORDINLINE(0x701D, 0xA824);
  900. extern pascal OSErr UTGetBlock(short refNum, void *log2PhyProc, unsigned long blockNum, short gbOption, Ptr *buffer)
  901.  TWOWORDINLINE(0x701F, 0xA824);
  902. extern pascal OSErr UTReleaseBlock(Ptr buffer, short rbOption)
  903.  TWOWORDINLINE(0x7020, 0xA824);
  904. extern pascal OSErr UTFlushCache(short refNum, short fcOption)
  905.  TWOWORDINLINE(0x7021, 0xA824);
  906. extern pascal OSErr UTMarkDirty(Ptr buffer)
  907.  TWOWORDINLINE(0x7023, 0xA824);
  908. extern pascal OSErr UTTrashVolBlocks(VCBPtr volCtrlBlockPtr)
  909.  TWOWORDINLINE(0x7024, 0xA824);
  910. extern pascal OSErr UTTrashFileBlocks(VCBPtr volCtrlBlockPtr, unsigned long fileNum)
  911.  TWOWORDINLINE(0x7025, 0xA824);
  912. extern pascal OSErr UTTrashBlocks(unsigned long beginPosition, unsigned long byteCount, VCBPtr volCtrlBlockPtr, short fileRefNum, short tbOption)
  913.  TWOWORDINLINE(0x7026, 0xA824);
  914. extern pascal OSErr UTCacheReadIP(void *log2PhyProc, unsigned long filePosition, Ptr ioBuffer, short fileRefNum, unsigned long reqCount, unsigned long *actCount, short cacheOption)
  915.  TWOWORDINLINE(0x7027, 0xA824);
  916. extern pascal OSErr UTCacheWriteIP(void *log2PhyProc, unsigned long filePosition, Ptr ioBuffer, short fileRefNum, unsigned long reqCount, unsigned long *actCount, short cacheOption)
  917.  TWOWORDINLINE(0x7028, 0xA824);
  918. extern pascal OSErr UTBlockInFQHashP(short vRefNum, unsigned long diskBlock)
  919.  TWOWORDINLINE(0x702C, 0xA824);
  920. /*
  921.  *    File System Manager call prototypes
  922.  */
  923. extern pascal OSErr InstallFS(FSDRecPtr fsdPtr);
  924. extern pascal OSErr RemoveFS(short fsid);
  925. extern pascal OSErr SetFSInfo(short fsid, short bufSize, FSDRecPtr fsdPtr);
  926. extern pascal OSErr GetFSInfo(short selector, short key, short *bufSize, FSDRecPtr fsdPtr);
  927. extern pascal OSErr InformFSM(short theMessage, void *paramBlock);
  928. extern pascal OSErr InformFFS(short fsid, void *paramBlock);
  929.  
  930. #if PRAGMA_IMPORT_SUPPORTED
  931. #pragma import off
  932. #endif
  933.  
  934. #if PRAGMA_ALIGN_SUPPORTED
  935. #pragma options align=reset
  936. #endif
  937.  
  938. #ifdef __cplusplus
  939. }
  940. #endif
  941.  
  942. #endif /* __FSM__ */
  943.